import { createSSRApp } from "vue";
import pinia from "./store";
import uviewPlus from "uview-plus";
import App from "./App.vue";
import FooterContent from "./components/FooterContent.vue";
// import CommonDialog from "./components/CommonDialog.vue";
import CustomNav from "./components/CustomNav.vue";
import globalComponents from "./components/global"; // 修改导入
import mpHtml from "mp-html/dist/uni-app/components/mp-html/mp-html.vue";

export function createApp() {
  const app = createSSRApp(App);
  app.use(pinia);
  app.use(uviewPlus);
  // 全局注册组件
  // app.component("CommonDialog", CommonDialog);
  app.component("CustomNav", CustomNav);
  app.component("FooterContent", FooterContent);
  app.use(mpHtml);
  app.use(globalComponents); // 使用全局组件插件
  return {
    app,
  };
}
